package com.ccl.iot;

import com.ccl.iot.IOTInterface.IOTListener;
import com.ccl.iot.IOTInterface.IOTStructureArrayMonitorInterface;
import com.ccl.iot.IOTInterface.IOTStructureMonitorInterface;

public interface IOTObject {
    public long getID();

    /*
     *
     */
    public interface IOTVariable<TYPE> extends IOTObject {
        public TYPE getValue();

        public boolean setValue(TYPE aValue);
    }

    /*
     *
     */
    public interface IOTStructure extends IOTObject, IOTStructureMonitorInterface {
        public int getMemberCount();

        public String getMemberValue(String aMember);

        public boolean setMemberValue(String aMember, String aValue);
    }

    /*
     *
     */
    public interface IOTStructureArray extends IOTObject, IOTStructureArrayMonitorInterface {
        public int getMemberCount(long aIndex);

        public String getMemberValue(long aIndex, String aMember);

        public boolean setMemberValue(long aIndex, String aMember, String aValue);
    }

    /*
     *
     */
    public interface IOTListenObject extends IOTObject, IOTListener {
    }

    /*
     *
     */
    public interface IOTMultiListenObject extends IOTListenObject {
        public void addListener(IOTListener aListener);

        public void removeAllListeners(IOTListener aListener);
    }

    /*
     *
     */
    public interface IOTNamedObject extends IOTListenObject, IOTInterface.IOTNameMonitorInterface {
        public static final String KIOT_DEFAULT_NAME = "NONE";

        public String getName();

        public boolean setName(String aName);
    }

    /*
     *
     */
    public interface IOTIcondObject extends IOTListenObject, IOTInterface.IOTIconMonitorInterface {
        public static final String KIOT_DEFAULT_ICON = "0";

        public String getIcon();

        public boolean setIcon(String aIcon);
    }

    public interface OnHideRestoreListener {
        public void onHideStateChange(boolean hide);

        public void onRestoreStateChange(boolean restore);

        public void retoreOuther();
    }

    /*
     *
     */
    public interface IOTNameListObject extends IOTNamedObject, IOTInterface.IOTNameListMonitorInterface {

        public String getName(long aIndex);

        public boolean setName(long aIndex, String aName);
    }

    /*
     *
     */
    public interface IOTIconListObject extends IOTIcondObject, IOTInterface.IOTIconListMonitorInterface {

        public String getIcon(long aIndex);

        public boolean setIcon(long aIndex, String aIcon);
    }

    /*
     *
     */
    public interface IOTListObject<TYPE> extends IOTListenObject, IOTInterface.IOTListMonitorInterface<TYPE> {
        //public ArrayList<TYPE> getList();
    }

    /*
     *
     */
    public interface IOTScannableObject<TYPE> extends IOTListObject<TYPE> {
        public interface IOTScanListener<TYPE> extends IOTListener {
            public void onScanStart(IOTScannableObject<?> aScanner);

            public void onScanResult(IOTScannableObject<?> aScanner, TYPE aObject);

            public void onScanStop(IOTScannableObject<?> aScanner);
        }

        public boolean isScanning();

        public boolean startScan(IOTScanListener<TYPE> aListener);

        public boolean stopScan();
    }

    /*
     *
     */
    public interface IOTOnlineObject extends IOTListenObject, IOTInterface.IOTOnlineMonitorInterface {
        public boolean isOnline();

        public boolean setOnline(boolean aOnline);
    }

    /*
     *
     */
    public interface IOTAuthObject extends IOTListenObject, IOTInterface.IOTAuthMonitorInterface {
        public int getAuth();

        public boolean setAuth(int aNewAuth);
    }

    /*
     *
     */
    public interface IOTMultiStateObject extends IOTListenObject, IOTInterface.IOTStateMonitorInterface {
        public int getState();

        public boolean setState(int aNewState);
    }


    public interface IOTDVRInner{
        public int getCornerId();
    }

}
